package com.cloudfun.campusshare.repo;

import com.cloudfun.campusshare.common.constant.AsyncTaskBizType;
import com.cloudfun.campusshare.common.constant.AsyncTaskStatus;
import com.cloudfun.campusshare.configuration.jpa.GaodaoRepository;
import com.cloudfun.campusshare.entity.AsyncTaskEntity;
import com.cloudfun.campusshare.entity.Replenish;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.Collection;
import java.util.List;

/**
 * Created by CodeGenerator on 2020/06/04
 */
public interface ReplenishRepo extends GaodaoRepository<Replenish,String> {
    @Modifying
    @Query(value = "update replenish set laundry_detergent=?2,disinfectant=?3,replenish_status=?4 where imei=?1",nativeQuery = true)
    void updateStockCapacity(String imei,Integer uselaundryDetergent,Integer use,Integer status);
}